
function copyProperties<T, U>(target: T, source: U): T {
    Object.getOwnPropertyNames(source).forEach(prop => {
        if (typeof target === 'object' && target && typeof source[prop] === 'object' && source[prop] !== null) {
            // 如果是引用类型，进行递归复制
            copyProperties(target[prop], source[prop]);
        } else {
            // 如果是原始类型或其他值，直接复制
            target[prop] = (source as any)[prop];
        }
    });
    return target;
}


export default {
    copyProperties: copyProperties
}